import request from '@/utils/request'

export function imgMigration(data) {
  return request({
    url: '/rangeBuild/tools/imgMigration',
    method: 'post',
    data
  })
}

export function sqlConvert(data) {
  return request({
    url: '/rangeBuild/tools/sqlConvert',
    method: 'post',
    data
  })
}

export function queryImgMigRecords(data) {
  return request({
    url: '/rangeBuild/tools/queryImgMigRecords',
    method: 'get',
    params: data
  })
}

export function getImgBatchRecords(data) {
  return request({
    url: '/rangeBuild/tools/getImgBatchRecords',
    method: 'get',
    params: data
  })
}

export function getMigLogDetail(data) {
  return request({
    url: '/rangeBuild/tools/getMigLogDetail',
    method: 'get',
    params: data
  })
}

export function pauseTask(data) {
  return request({
    url: '/rangeBuild/tools/pauseTask',
    method: 'post',
    params: data
  })
}

export function resumeTask(data) {
  return request({
    url: '/rangeBuild/tools/resumeTask',
    method: 'post',
    params: data
  })
}

export function rollbackMigrate(data) {
  return request({
    url: '/rangeBuild/tools/rollbackMigrate',
    method: 'post',
    params: data
  })
}

export function getMigBaseInfo(data) {
  return request({
    url: '/rangeBuild/tools/getMigBaseInfo',
    method: 'get',
    params: data
  })
}

export function getPreEnvList(data) {
  return request({
    url: '/rangeBuild/tools/getPreEnvList',
    method: 'get',
    params: data
  })
}

export function exportSqlFile(data) {
  return request({
    url: '/rangeBuild/tools/exportSqlFile',
    method: 'get',
    params: data
  })
}

export function getSqlConvertLines(data) {
  return request({
    url: '/rangeBuild/tools/getSqlConvertLines',
    method: 'get',
    params: data
  })
}
